package com.loop;

/*
1900-2024的闰年
*/
public class Demo05 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1900; i <= 2024; i++) {
            if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) {
                System.out.print(i+" ");
                count++;
                if (count % 3 == 0) {
                    System.out.println();
                }
            }
        }

    }
}
